<template>
    <div>
        <el-row :gutter="20">
            <el-col :span="10">样式一：<area-select :level = "2" type="all" v-model="selected" :data="pcaa" @change="onChange"></area-select></el-col>
            <el-col :span="10">样式二：<area-cascader type='all' v-model="selected2" :level='1' :data="pcaa" @change="onChange2"></area-cascader></el-col>
        </el-row>
    </div>
</template>
<script>
    import { pcaa} from 'area-data'
    export default {
        data() {
            return {
                selected: [],
                selected2: [],
                pcaa: pcaa
            };
        },
        created() {
            this.selected = ["210000","210100","210102"]
            // this.selected2 = ["210000","210100","210102"]
        },
        methods: {
            onChange () {
                console.info('样式一结果：', JSON.stringify(this.selected))
            },
            onChange2 () {
                console.info('样式二结果：', JSON.stringify(this.selected2))
            }
        }
    }

</script>
